package systeminfo

/*
#cgo CFLAGS: -Wno-date-time
const char* buildTime() {
    static const char* t = __DATE__ " " __TIME__;
    return t;
}
*/
import "C"

type VersionInfo struct {
	Version   string `json:"version"`
	BuildDate string `json:"buildDate"`
}

func getBuildDate() string {
	return C.GoString(C.buildTime())
}

func ReadVersionInfo() *VersionInfo {
	return &VersionInfo{
		Version:   "1.0.0",
		BuildDate: getBuildDate(),
	}
}
